package com.wzdigit.wms.wms.task;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import com.wzdigit.wms.basic.service.code.back.BackErrorRemindService;

/**
 * 回传异常信息发送邮箱--定时任务
 * @author Administrator
 *
 */
@ConditionalOnExpression("${schedule.common.switch}")
@Component
public class BackErrorRemindTask {

	@Autowired
    private BackErrorRemindService backErrorRemindService;
	
	//@Scheduled(cron = "0 0/5 * * * ?")
    @Scheduled(cron = "0 0/20 * * * ?")
    public void execute() throws Exception {
    	backErrorRemindService.deal();
    }
}
